🌐 English API Documentation: RemoteControlBridge
A TCP Bridge Plugin for LiquidBounce

Overview
RemoteControlBridge is a user script plugin for LiquidBounce (a popular Minecraft 1.8.9 cheat client).
It runs inside the LiquidBounce scripting engine and opens a local TCP server (default port: 25560) to enable external programs (e.g., Python, Node.js, or automation tools) to interact with your Minecraft client in real time.

✅ Use cases:

Send chat/command from an external AI agent
Automate in-game actions via scripts
Monitor server chat for bots or alerts
Integrate Minecraft with home automation or data pipelines
Only one external client connection is allowed at a time. Communication uses line-delimited UTF-8 JSON over TCP.

How to Use
Place RemoteControlBridge.mjs in your LiquidBounce scripts/ folder.
In-game, go to Scripts → Enable "RemoteControlBridge".
The plugin will display:
§a[RemoteControlBridge] Listening on port: 25560
Connect your external program to 127.0.0.1:25560.
🔒 The server binds only to localhost — it is not accessible from other devices for security.

Protocol Specification
Connection Handshake
Upon successful connection, the plugin sends a welcome message:

json
{"type":"connected","port":25560}
If you don’t receive this, check:

Is LiquidBounce running?
Is the script enabled in the Scripts menu?
Is another program already connected?
Supported Commands (Client → LiquidBounce)
Send each command as a single JSON object + \n.

1. sendChat — Send Message or Command
json
{"cmd":"sendChat","message":"/help"}
If message starts with /, it is executed as a Minecraft command.
Otherwise, it is sent as a chat message.
Success Response:

json
{"type":"action","result":"messageSent","message":"/help"}
Error Examples:

json
{"error":"Player is not in a world"}
{"error":"Invalid message content"}
2. waitForChat — Wait for Next Chat Message
json
{"cmd":"waitForChat","timeout":30000}
Waits for the next server-sent chat message (via GameMessageS2CPacket).
timeout: milliseconds (max 60000). Default: 30000.
Possible Responses:

✅ New message:
json
{"type":"chat","result":"newMessage","message":"Teleported to spawn!"}⏱️ Timeout:
json
{"type":"chat","result":"timeout"}
❌ Error:
json
{"error":"Another waitForChat request is already pending"}
⚠️ Only one waitForChat can be active at a time.
LiquidBounce will reject additional requests until the current one completes.

3. ping — Health Check
json
{"cmd":"ping"}
Response:

json
Useful for checking if the bridge is still alive.

Technical Notes
Messages are extracted via packet.content().getString() → plain text only (formatting codes like §a are removed).
All network I/O runs on background threads; command execution is safely dispatched to Minecraft’s main thread.
The plugin automatically cleans up connections when disabled or on shutdown.